<%@ page import="com.zcwin.product.core.model.SysUser" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body>
<%
    String userLoginName = request.getParameter("_id");
    org.springframework.web.context.WebApplicationContext wac = org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
    com.zcwin.product.core.service.ISysUserService sysUserService = (com.zcwin.product.core.service.ISysUserService) wac.getBean("sysUserServiceImpl");
    SysUser user = sysUserService.getByHql("from SysUser su where su.userLoginName = '" + userLoginName + "'");
    if (user != null) {
        request.getSession().setAttribute("zcwinSysUser", user);
        out.print(user.getUserName() + "登录成功！");
%>
<a href="./oa/index">首页</a>
<%
    } else {
        response.sendRedirect("./oa/login");
    }
%>
</body>
</html>
